package com.platform.module.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.platform.common.annotation.Excels;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.platform.common.annotation.Excel;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import javax.validation.constraints.NotBlank;
import com.platform.common.core.domain.BaseEntity;

import java.util.Date;

/**
 * 室温采集数据对象 temp_record
 * 
 * @author wangqi
 * @date 2020-07-28
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("temp_record")
public class TempRecord extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** id */
    @TableId(type = IdType.AUTO)
    private Long id;

    /** 室温采集器id */
    @NotBlank(message = "室温采集器id不能为空")
    @Excel(name = "室温采集器id")
    private String tempId;

    /** 温度 */
    @Excel(name = "温度")
    private String temp;

    /** 湿度 */
    @Excel(name = "湿度")
    private String damp;

    /** 电量 */
    @Excel(name = "电量")
    private String elec;

    /** 内部NTC故障报警 */
    @Excel(name = "内部NTC故障报警")
    private String alarm1;

    /** 外部NTC故障报警 */
    @Excel(name = "外部NTC故障报警")
    private String alarm2;

    /** 温湿度传感器故障报警 */
    @Excel(name = "温湿度传感器故障报警")
    private String alarm3;

    @TableField(exist = false)
    private String createBy;

    @TableField(exist = false)
    private String updateBy;

    @TableField(exist = false)
    private Date updateTime;

    /** 室温采集器类型 */
    @Excels({
            @Excel(name = "室温采集器ID", targetAttr = "brtId", type = Excel.Type.EXPORT),
    })
    @TableField(exist = false)
    private BaseRoomTemp roomTemp ;

    /** 厂商信息 */
    @Excels({
            @Excel(name = "厂商名称", targetAttr = "factoryName", type = Excel.Type.EXPORT),
            @Excel(name = "厂商代码", targetAttr = "factoryCode", type = Excel.Type.EXPORT)
    })
    @TableField(exist = false)
    private BaseFactory factory;

    @Excel(name = "室温采集器ID", type = Excel.Type.IMPORT)
    @TableField(exist = false)
    private String brtId;

    @TableField(exist = false)
    private String ids;
}
